package com.example.li_han.pojo;

import java.util.Date;

public class PingLun {
    private int pingLunId;         // 评论ID
    private int newsId;            // 关联新闻ID
    private String userZhangHao;   // 用户账号
    private String pingLunContent; // 评论内容
    private Date pingLunTime;      // 评论时间
    private int status;            // 状态：0-待审核，1-已通过，2-已拒绝
    private String adminRemark;    // 管理员备注
    private String newsTitle;
    private int userId;  // 添加 userId 属性

    // 添加 getter 和 setter 方法
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }
    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle(String newsTitle) {
        this.newsTitle = newsTitle;
    }

    // 构造方法
    public PingLun() {}

    public PingLun(int pingLunId, int newsId, String userZhangHao, String pingLunContent,
                   Date pingLunTime, int status, String adminRemark) {
        this.pingLunId = pingLunId;
        this.newsId = newsId;
        this.userZhangHao = userZhangHao;
        this.pingLunContent = pingLunContent;
        this.pingLunTime = pingLunTime;
        this.status = status;
        this.adminRemark = adminRemark;
    }

    // Getter和Setter方法
    public int getPingLunId() { return pingLunId; }
    public void setPingLunId(int pingLunId) { this.pingLunId = pingLunId; }

    public int getNewsId() { return newsId; }
    public void setNewsId(int newsId) { this.newsId = newsId; }

    public String getUserZhangHao() { return userZhangHao; }
    public void setUserZhangHao(String userZhangHao) { this.userZhangHao = userZhangHao; }

    public String getPingLunContent() { return pingLunContent; }
    public void setPingLunContent(String pingLunContent) { this.pingLunContent = pingLunContent; }

    public Date getPingLunTime() { return pingLunTime; }
    public void setPingLunTime(Date pingLunTime) { this.pingLunTime = pingLunTime; }

    public int getStatus() { return status; }
    public void setStatus(int status) { this.status = status; }

    public String getAdminRemark() { return adminRemark; }
    public void setAdminRemark(String adminRemark) { this.adminRemark = adminRemark; }
}